package cn.ahaiahaixx.supemarketonline.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.ahaiahaixx.supemarketonline.base.BaseAdminUserController;
import cn.ahaiahaixx.supemarketonline.model.TbConfigModel;
import cn.ahaiahaixx.supemarketonline.service.ConfigService;
import cn.ahaiahaixx.supemarketonline.utils.JsonMessage;

/**
 * 后台配置控制器
 * @author Aiden Pearce
 *
 */
@RestController
@RequestMapping("/config")
public class ConfigController extends BaseAdminUserController{
  
  @Autowired
  private ConfigService configService;
  
  @RequestMapping("/queryTokenTimeout")
  public JsonMessage queryTokenTimeout(TbConfigModel model)throws Exception{
    return configService.queryTokenTimeout(model);
  }

  @RequestMapping("/updateTokenTimeout")
  public JsonMessage updateTokenTimeout(TbConfigModel model)throws Exception{
    return configService.updateTokenTimeout(model);
  }
  @RequestMapping("/updatetitle")
  public JsonMessage updateTitle(TbConfigModel model)throws Exception{
    return configService.updateTitle(model);
  }
}
